<%@ page import="BusinessLogic.ControllerFacade" %>
<%@ page errorPage="error.jsp" %>

<%
	ControllerFacade c = (ControllerFacade)session.getAttribute("c");   

    String movie = request.getParameter("movieName");
%>

<h2>Please fill all the fields</h2>

<form action="index.jsp" method="post">
    <table>
        <tr>
            <td>
                <input type="hidden" name="action" value="PreformAddRecommendation" />
            </td>
            <td>
                <input type="hidden" name="movieName" value="<% out.print(movie); %>" />
            </td>
        </tr>
        <tr>
            <td>
                <label title="name">Recommend Movie</label>
            </td>
            <td>
                <span class="movie"><% out.print(movie); %></span>
            </td>
        </tr>
        <tr>
            <td>
                <label title="rank">Choose Rank</label>
            </td>
            <td>
                <select name="rank" id="rank" >
        <%
                    for (int i=10; i>=1; i--)
                        out.println("<option value=\""+i+"\">"+i+"</option>");
        %>
                </select>
                 (10 is highest)
            </td>
        </tr>
        <tr>
            <td>
                <label title="description">Description</label>
            </td>
            <td>
                <input type="text" name="description" id="description" />(optional)
            </td>
        </tr>
        <tr>
            <td colspan="2" class="submit">
                <input type="submit" value="Submit" />
            </td>
        </tr>
    </table>
</form>
